package com.jilijili.pojo.mo;


import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.time.LocalDateTime;
import java.util.Map;


@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Accessors(chain = true)
@Builder
@Document(value = "message")
public class MessageMo {

    //消息主键id
    @Id
    private String id;

    //消息来自的用户id
    @Field("fromUserId")
    private String fromUserId;

    //消息来自的用户昵称
    @Field("fromNickname")
    private String fromNickname;

    //消息来自的用户头像
    @Field("fromFace")
    private String fromFace;

    //消息发送到某对象的用户id
    @Field("toUserId")
    private String toUserId;

    // 消息类型
    @Field("msgType")
    private Integer msgType;

    // 消息内容
    @Field("msgContent")
    private Map msgContent;

    // 消息创建时间
    @Field("createTime")
    private LocalDateTime createTime;


}
